import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/about',
    name: 'About',
    component: () => import( '../views/About.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import( '../views/Home.vue')
  },
  {
    path: '/home/main',
    name: 'main',
    component: () => import( '../components/home/Main.vue')
  },
  {
    path: '/home/search',
    name: 'search',
    component: () => import( '../components/home/Search.vue')
  },
  {
    path: '/home/brand',
    name: 'brand',
    component: () => import( '../components/home/Brand.vue')
  },
  {
    path: '/home/brandList',
    name: 'brandList',
    component: () => import( '../components/home/BrandList.vue')
  },
  
  {
    path: '/home/goods',
    name: 'goods',
    component: () => import( '../components/home/Goods.vue')
  },
  {
    path: '/home/detailactions',
    name: 'detailactions',
    component: () => import( '../components/home/Detailactions.vue')
  },
  {
    path: '/home/listAction',
    name: 'listAction',
    component: () => import( '../components/home/ListAction.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import( '../components/cart/Cart.vue')
  },
  {
    path: '/cart/order',
    name: 'order',
    component: () => import( '../components/cart/Order.vue')
  },
  {
    path: '/category',
    name: 'category',
    component: () => import( '../components/category/Category.vue')
  },
  {
    path: '/category/categorylist',
    name: 'categorylist',
    component: () => import( '../components/category/Categorylist.vue')
  },
  {
    path: '/my',
    name: 'my',
    component: () => import( '../components/my/My.vue')
  },
  {
    path: '/my/feedback',
    name: 'feedback',
    component: () => import( '../components/my/Feedback.vue')
  },
  {
    path: '/my/address',
    name: 'address',
    component: () => import( '../components/my/Address.vue')
  },
  {
    path: '/my/saveAction',
    name: 'saveAction',
    component: () => import( '../components/my/SaveAction.vue')
  },
  {
    path: '/my/detailActionss',
    name: 'detailActionss',
    component: () => import( '../components/my/DetailActionss.vue')
  },
  
  {
    path: '/topic',
    name: 'topic',
    component: () => import( '../components/topic/Topic.vue')
  },
  {
    path: '/topic/detailaction',
    name: 'detailaction',
    component: () => import( '../components/topic/Detailaction.vue')
  },
 
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
